<template>
  <div>
    <h1>动态组件</h1>
    <button @click="comName = 'CompOne'">组件一</button><button @click="comName = 'CompTow'">组件二</button>
    <component :is="comName"/>
  </div>
</template>

<script>
import CompOne from './components/V-组件一.vue'
import CompTow from './components/V-组件二.vue'

export default {
  components: {
    CompOne,
    CompTow
  },
  data() {
    return {
      comName:"CompOne"
    }
  },
}
</script>

<style></style>
